extends Node2D


onready var bg=$healthBar/bg
onready var bar=$healthBar/bg/bar

var value=1 setget set_value
func set_value(v):
	v=clamp(v,0,1)
	bar.rect_size.x=bg.rect_size.x*v
